package com.wf.smartcomm.server.bean;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

/** 
 * @author 38884306@qq.com  
 * @version ����ʱ�䣺2015-5-18 ����10:57:59 
 * 
 */
@Entity
@Table(name = "t_payment")
public class Payment {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;	
	
	@ManyToOne
	@JoinColumn(name = "uid")
	private User user;
	
	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "hid")
	private House house;
	
	@Expose
	@Column(length = 128)
	private String thirdOrderCode;
	
	@Expose
	@Column(length = 32)
	private String billId;
	
	@Expose
	@Column
	private Integer type;
	
	@Expose
	@Column
	private double priceWithoutDiscount;
	
	@Expose
	@Column
	private double discountRate;
	
	@Expose
	@Column
	private double priceWithDiscount;
	
	@Expose
	@Column
	private BigDecimal sum;
	
	@Expose
	@Column
	private Integer method;
	
	@Expose
	@Column(length = 20)
	private String fromAt;
	
	@Expose
	@Column(length = 20)
	private String channel;
	
	@Expose
	@Column(length = 20)
	private String toAt;
	
	@Expose
	@Column(length = 3200)
	private String remark;
	
	@Column(length = 20)
	private String createdAt;
	
	@Expose
	@Column(length = 20)
	private String updateAt;
	
	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public House getHouse() {
		return house;
	}

	public void setHouse(House house) {
		this.house = house;
	}


	public String getFromAt() {
		return fromAt;
	}

	public void setFromAt(String fromAt) {
		this.fromAt = fromAt;
	}

	public String getToAt() {
		return toAt;
	}

	public void setToAt(String toAt) {
		this.toAt = toAt;
	}

	public double getPriceWithoutDiscount() {
		return priceWithoutDiscount;
	}

	public void setPriceWithoutDiscount(double priceWithoutDiscount) {
		this.priceWithoutDiscount = priceWithoutDiscount;
	}

	public double getDiscountRate() {
		return discountRate;
	}

	public void setDiscountRate(double discountRate) {
		this.discountRate = discountRate;
	}

	public double getPriceWithDiscount() {
		return priceWithDiscount;
	}

	public void setPriceWithDiscount(double priceWithDiscount) {
		this.priceWithDiscount = priceWithDiscount;
	}

	
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	
	public String getUpdateAt() {
		return updateAt;
	}

	public void setUpdateAt(String updateAt) {
		this.updateAt = updateAt;
	}

	public BigDecimal getSum() {
		return sum;
	}

	public void setSum(BigDecimal sum) {
		this.sum = sum;
	}

	public Integer getMethod() {
		return method;
	}

	public void setMethod(Integer method) {
		this.method = method;
	}

	public String getThirdOrderCode() {
		return thirdOrderCode;
	}

	public void setThirdOrderCode(String thirdOrderCode) {
		this.thirdOrderCode = thirdOrderCode;
	}

	public String getBillId() {
		return billId;
	}

	public void setBillId(String billId) {
		this.billId = billId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}
}
